﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace AspDotNet.Framework.Mvc.FirstDemo.Models
{
    public class Student
    {
        public int ID { get; set; }
        [DisplayName("姓名")]
        [Required(ErrorMessage = "姓名为必填信息")]
        public string Name { get; set; }
        public DateTime Birthday { get; set; }
        [DisplayName("性别")]
        public bool IsChecked { get; set; }

        [Required(ErrorMessage = "There's enough good music here for you to chose!")]
        public GoodMusic FavouriteMusic { get; set; }
        public string SelfIntroduction { get; set; } = "This is a good people!";

        public List<string> Role { get; set; }=new List<string>()
        {
            "Admin",
            "Normal"
        };

        public static List<Student> Students = new List<Student>()
        {
            new Student()
            {
                ID = 1,
                Name = "tom",
                Birthday = new DateTime(2022, 5, 27),
            },
            new Student()
            {
                ID = 2,
                Name = "jerry",
                Birthday = new DateTime(2022, 2, 15),
            },
            new Student()
            {
                ID = 3,
                Name = "jack",
                Birthday = new DateTime(2022, 12, 19),
            }
        };
    }

    public enum GoodMusic
    {
        Metal,
        HeavyMetal,
        PowerMetal,
        BlackMetal,
        ThashMetal,
        DeathMetal // . . .
    }
}